           
          
         
            //var originalWidth = consultWidth = window.innerWidth;
            //var linkJumpCount = 16;
            var linkHref;
            var beginningDelay = null;
            var animateDelayCount = 1300;
            //var watchBrowse = null;

            //first ele add class
            function fstAddClass(){
                for(var c = 0;c < $('.addFst').length;c++){
                    $('.addFst:eq(' + c + ')>*:first-child').addClass('active');
                }
            }
            
            function countDown(){
                    linkJumpCount -= 1;
                
                    //linkJumpCount=0时，跳转页面
                    if(linkJumpCount <= 0){
                        location.href = linkHref;
                    }

                    //每秒执行一次,showTime()
                    setTimeout("countDown()",100);
            }
            /*
            //页面内容高度小于窗口高度
            function checkContnHeight(){
                if($('.container')[0].offsetHeight < window.innerHeight){
                    $('.container').addClass('fillAll');
                }
            }
            */
            //禁止滚动
            /*$('body')[0].addEventListener('mousewheel',function (evt,delta) {
                evt.preventDefault();
                evt.stopImmediatePropagation();
            }, { passive: false })*/
            function onMouseScroll(e) {
                    event.preventDefault();
                    var wheel = e.originalEvent.wheelDelta || -e.originalEvent.detail;
                    var delta = Math.max(-1, Math.min(1, wheel) );
                    if(delta < 0){//向下滚动
                        scrollDown = true;
                    }else{//向上滚动
                        scrollDown = false;
                    }
            }
            
            //前进后退页面处于顶部
            function beginningAtTop(){
                setTimeout(function(){
                    document.documentElement.scrollTop = document.body.scrollTop = 0;
                },10)
            }

            function showSubTip(t,err){
                $('.subTip span').text(t);
                prevent = true;
                $('.subTip').addClass('active');
                if(err){
                    $('.subTip').addClass('err');
                }
                subTip = setTimeout(function(){
                        prevent = false;
                },2500);
                setTimeout(function(){
                        $('.subTip').removeClass('active');
                        $('.subTip').removeClass('err');
                },2510)
            }
            var subTip = null;
            var prevent = false;

            //返回顶部
            var toTop = null;
            function windowToTop(){
                clearInterval(toTop);
                toTop = setInterval(function(){
                    var current = document.documentElement.scrollTop || document.body.scrollTop;
                    var val = Math.ceil(current / 10);
                    var newScroll = current - val;
                    if(newScroll <= 0){
                        document.documentElement.scrollTop = document.body.scrollTop = 0;
                        clearInterval(toTop);
                        toTop = null
                    }else{
                        document.documentElement.scrollTop = document.body.scrollTop = newScroll;
                    }
                    
                    
                },10);
                
            }

            //滑动至指定部分
            var scrollInt = null;
            function scrollSec(val){
                scrollInt = setInterval(function(){
                    var now = document.documentElement.scrollTop || document.body.scrollTop;
                    now = parseInt(now);
                    if(now > val){
                        var v = Math.ceil((now - val) / 15);
                        now -= v;
                    }else if(now < val){
                        var v = Math.ceil((val - now) / 15);
                        now += v;
                    }
                    document.documentElement.scrollTop = document.body.scrollTop = now;
                   
                    if(now == val){
                        clearInterval(scrollInt);
                    }
                },10)
            }


            //判断是否为移动设备
            function browserRedirect(){
                var sUserAgent = navigator.userAgent.toLowerCase();
                var bIsIpad = sUserAgent.match(/ipad/i) == "ipad";
                var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";
                var bIsMidp = sUserAgent.match(/midp/i) == "midp";
                var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";
                var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";
                var bIsAndroid = sUserAgent.match(/android/i) == "android";
                var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
                var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
                if (bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM) {
                    $('body').addClass('mobileDevice');
                    mobileDevice = true;
                    return true;
                }else{
                    $('body').addClass('pc');
                    return false;
                }
            }

            
            function whetherHaveIt(thing,val){
                return (thing.indexOf(val) >= 0?true:false);
            }


            //拖动时复制文本透明背景色
            //window.getSelection ? window.getSelection().removeAllRanges() : document.selection.empty();

           
            $(document).ready(function(){
                browserRedirect(); 
                fstAddClass();
                beginningAtTop();
                $(window).scroll(function() {
                    let scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
                    if(scrollTop >= 200){
                        $('header .heading').addClass('active');
                    }else{
                        $('header .heading').removeClass('active');
                    }
                    //1300
                    if(scrollTop >= 600){
                        $('.side').addClass('active');
                    }else{
                        $('.side').removeClass('active');
                    }
                })

                if(localStorage.getItem('token')){
                    $('body').addClass('logged');
                }
            })
            

            
            

        